
function highlight(elemname)
{
        if (!document.getElementsByName) return;
        elems = document.getElementsByName(elemname);
        n = elems.length;
        for (i=0; i<n; i++) {
                elems.item(i).style.backgroundColor = "yellow";
        }

}

function dehighlight(elemname)
{
        if (!document.getElementsByName) return;
        elems = document.getElementsByName(elemname);
        n = elems.length
        for (i=0; i<n; i++) {
                elems.item(i).style.backgroundColor = "transparent";
        }
}

function toggleDisplay(elemname)
{
        if (!document.getElementsByName) return;
        elems = document.getElementsByName(elemname);
        n = elems.length
        for (i=0; i<n; i++) {
                with (elems.item(i).style) {
                  if (display == "none")
                      display = ""
                  else display = "none";
                }
        }
}

function swapDisplay(elid1,elid2)
{
    if (!document.getElementById) return;

    var el1 = document.getElementById(elid1);
    var el2 = document.getElementById(elid2);

    var tmp = el1.style.display;
    el1.style.display = el2.style.display;
    el2.style.display = tmp;
}

//pop up windows
function popup(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
   href=mylink;
else
   href=mylink.href;
window.open(href, windowname, 'width=400,height=300,scrollbars=yes');
return false;
}